//
//  Const.h
//  AiYuanTai
//
//  Created by cdyqkj on 16/6/23.
//  Copyright © 2016年 sima. All rights reserved.
//

#ifndef Const_h
#define Const_h

typedef enum{
    RecommandType,
    MovieType,
    VarietyType,
    MusicType,
} ControllerType;

#define YYSRGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]


#define YYSGlobalColor [UIColor colorWithRed:0/255.0 green:222/255.0  blue:0/255.0 alpha:1]

#define YYSLabelTextColor [UIColor colorWithRed:75/255.0 green:75/255.0  blue:75/255.0 alpha:1]

#define YYSScreenW  [UIScreen mainScreen].bounds.size.width
#define YYSScreenH  [UIScreen mainScreen].bounds.size.height

#define JUDGEISLOGIN if(!TOKEN){\
LoginViewController *login = [[LoginViewController alloc] init];\
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:login animated:YES completion:^{\
}];\
    return ; \
}


//video
#define RECORD_MAX_TIME 8.0           //最长录制时间
#define TIMER_INTERVAL 0.05         //计时器刷新频率
#define VIDEO_FOLDER @"videoFolder" //视频录制存放文件夹


/** 适配*/
#define YYS_X_FROM6(x) ([UIScreen mainScreen].bounds.size.height/667 * (x))
//获取token
#define TOKEN [[NSUserDefaults standardUserDefaults] objectForKey:@"user_info"][@"user_token"]
//域名
#define BASE_URL_TEST @"http://blw.028wj.com"

//注册URL
#define Register_URL [NSString stringWithFormat:@"%@/api/user/signup",BASE_URL_TEST]
//发送验证码URL
#define SendCode_URL [NSString stringWithFormat:@"%@/api/user/sendcode",BASE_URL_TEST]
//登录URL
#define LOGIN_URL [NSString stringWithFormat:@"%@/api/user/signin",BASE_URL_TEST]

//主页列表URL
#define HOME_LIST_URL [NSString stringWithFormat:@"%@/api/site/index",BASE_URL_TEST]
//视频详情
#define DETAILVIDEO__URL [NSString stringWithFormat:@"%@/api/video/detail",BASE_URL_TEST]

//自栏目列表
#define VIDEO_LIST_URL [NSString stringWithFormat:@"%@/api/video/list",BASE_URL_TEST]


#endif /* Const_h */
